<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="../application/vue.js"></script>
    <style>
        .div{
            position:fixed;
            top:10px;
            right:500px;
            background-color:rgba(0,0,0,0.5);
            color:white;
            padding:20px;
        }
    </style>
</head>
<body>
    <div id="app">
        <input type="button" value="打开提示窗" onclick="addVue()">
    </div>
    <template id="adc">
        <div class="div">
            <p>{{msg}}</p>
            <input type="text" v-model="msg">
        </div>
    </template>
</body>
<script>
    function addVue(){
        var vm=new Vue({
            template:"#adc",
            data:{
                msg:"鸡你太美"
            }
        });
        // console.log(vm.$el);
        vm.$mount();
        // console.log(vm.$el);
        document.body.appendChild(vm.$el);
        setTimeout(function(){
            document.body.removeChild(vm.$el);
            vm.$destroy();
        },3000);
    }
</script>
</html>